home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cbibcode.arc / TIME.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-05  |  476 b   |  14 lines

  1. /* time.c     Turbo C Bible Functions, p. 338 */
  2. #include <stdio.h>
  3. #include <time.h>
  4. main()
  5. {
  6.     time_t tnow;
  7.     time(&tnow);/* Get the time in seconds since 0 hrs GMT, 1/1/70
  8.          * Convert the time to a string and print it.  This
  9.          * will be your local time provided you have set the
  10.          * environment variable TZ to your time zone.  The
  11.          * default is PST with daylight saving enabled.
  12.          * See "tzset" for details. */
  13.     printf("Current time = %s\n", ctime(&tnow));
  14. }